package factory;

import service.AdminCommonService;
import service.CommonService;
import service.StudentCommonService;
import service.TeacherCommonService;

public class CommonServiceFactory {

	public static final int STUDENT = 0;
	public static final int TEACHER = 1;
	public static final int ADMIN = 2;
	
	public static CommonService create(int flag) {
		switch(flag) {
		case STUDENT:return new StudentCommonService();
		case TEACHER:return new TeacherCommonService();
		case ADMIN : return new AdminCommonService();
		default:return null;
		}
	}
}
